package com.wutuo.roster.provider.enums;

import cn.apestar.core.base.BaseEnum;
import cn.apestar.util.CommonUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * 用户对象
 *
 * @author lvh
 * @version 版本号：【100-000-000】
 */
public enum UserRelationTypeEnum implements BaseEnum {
    /**
     * 1:父亲
     */
    USER_F("1", "妈妈"), /**
     * 2 母亲
     */
    USER_M("2", "爸爸"),

    /**
     * 3 爷爷
     */
    USER_YY("3", "爷爷"),

    /**
     * 4 奶奶
     */
    USER_NN("4", "奶奶"),

    /**
     * 3 爷爷
     */
    USER_SS("5", "叔叔"),

    /**
     * 4 阿姨
     */
    USER_AY("6", "阿姨"),

    /**
     * 3 婶婶
     */
    USER_SSS("7", "婶婶"),

    /**
     * 4 姑姑
     */
    USER_GG("8", "姑姑"),

    /**
     * 4 姑姑
     */
    USER_GZ("9", "姑丈"),

    /**
     * 4 姑姑
     */
    USER_YZ("10", "姨丈 "),

    /**
     * 其他
     */
    USER_QT("11", "其他 ");

    private Object code;

    private String name;

    UserRelationTypeEnum(Object code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override public String getValue() {

        // TODO Auto-generated method stub
        return code.toString();
    }

    public Long getLongValue() {

        // TODO Auto-generated method stub
        return CommonUtil.toLong(code, 0L);
    }

    @Override public String getName() {

        // TODO Auto-generated method stub
        return name;
    }

    /**
     * 返回该对象的MAP
     *
     * @return MAP集合
     */
    @Override public Map getMap() {

        Map m = new HashMap();
        m.put("type_id", code);
        m.put("type_name", name);
        return m;
    }

}